package com.ysc.BaoMing;

import java.util.Scanner;

public class Confirm {
    public void IfSure(int cnum){
        System.out.println("您确定你要报名的课程是这节吗？（Y/N）");
        int i = 0;
        Scanner in = new Scanner(System.in);

        while(i == 0){
            String answer = in.next();
            if (answer.equals("Y")||answer.equals("y")) {
                if(cnum<10){
                    System.out.println("好的，请跟随系统填入学生信息及首次费用信息");
                    i = 1;
                }
                else{
                    System.out.println("对不起，该班人数已满，请另选班级");
                }
            }
            else if (answer.equals("N")||answer.equals("n")){
                System.out.println("不确定的话请您重新选择：");
            }
            else {
                System.out.println("您的输入有误，请重新输入：");
            }
        }
    }
}
